using UnityEngine;

public class BallFlightAnalytic : BallFlight
{
	public override void SetInitialConditions(FlightParams initialConditions, PhysicsBall ball)
	{
		base.initialConditions = initialConditions;
	}

	public override void Reset()
	{
		base.flightTime = 0f;
	}

	public override void Update(float deltaTime)
	{
		base.flightTime += deltaTime;
	}

	public override Vector3 Position()
	{
		return PositionAt(base.flightTime);
	}

	public override Vector3 Velocity()
	{
		return Vector3.zero;
	}

	public override Vector3 PositionAt(float time)
	{
		float num = Mathf.Sign(0f - base.initialConditions.angularVelocity.x) * Mathf.Lerp(0f, Physics.gravity.y * 0.9f, Mathf.Abs(base.initialConditions.angularVelocity.x) / 200f);
		return 0.5f * (Physics.gravity + Vector3.down * num) * base.flightTime * base.flightTime + base.initialConditions.velocity * base.flightTime + base.initialConditions.position;
	}

	public override Vector3 VelocityAt(float time)
	{
		return Vector3.zero;
	}
}
